package xerr

var codeText = map[int]string{
	ServerCommonError:  "服务器异常",
	RequestParamsError: "请求参数错误",
	DBError:            "数据库错误",
}

func ErrMsg(code int) string {
	if msg, ok := codeText[code]; ok {
		return msg
	}
	return codeText[ServerCommonError]
}
